<template>
	<view class="p30 wrap">
		<p>
			创建时间:2020/07/22
		</p>
		<p> 版本说明: 正式 </p>
		<view>
			<!-- <button @tap="tab1()" class="cu-btn round line-pink">重新启动</button> -->
			<!-- <button @tap="tab2()" class="cu-btn round line-blue">获取当前版本信息</button> -->
		</view>
		<p>当前版本号 : {{versionCode}}</p>
		<p> 基座版本号 :{{txt1}}</p>
		<p> 运行环境的版本号:{{txt2}}</p>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				versionCode: '欢迎使用',
				txt1: '',
				txt2: ''
			}
		},
		mounted() {
			setTimeout(()=>{
				this.tab2()
			},1000)
		},
		methods: {
			tab1() {
				plus.runtime.restart();
			},
			tab2() {
				let Athis = this
				plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
					Athis.versionCode = widgetInfo.versionCode
				})
				this.txt1 = plus.runtime.uniVersion
				this.txt2 = plus.runtime.innerVersion
			}
		},
		onLoad() {}
	}
</script>

<style scoped>
	p {
		padding-top: 20rpx;
	}
</style>
